package ModelLayer;

import java.sql.Date;
import java.sql.Time;

public class Booking 
{
	private int id;
	private Treatment treatment;
	private Sale sale;
	private Employee hairDresser;
	private Person customer;
	private Date date;
	private Time startTime;
	private Time endTime;
	private String status;
	private Date dateCreated;
	
	public Booking()
	{
		
	}

	public int getId() 
	{
		return id;
	}

	public Treatment getTreatment() 
	{
		return treatment;
	}

	public Sale getSale() 
	{
		return sale;
	}

	public Employee getHairDresser() 
	{
		return hairDresser;
	}

	public Person getCustomer() 
	{
		return customer;
	}

	public Date getDate() 
	{
		return date;
	}

	public Time getStartTime() 
	{
		return startTime;
	}

	public Time getEndTime() 
	{
		return endTime;
	}

	public String getStatus() 
	{
		return status;
	}

	public Date getDateCreated() 
	{
		return dateCreated;
	}

	public void setId(int id) 
	{
		this.id = id;
	}

	public void setTreatment(Treatment treatment) 
	{
		this.treatment = treatment;
	}

	public void setSale(Sale sale) 
	{
		this.sale = sale;
	}

	public void setHairDresser(Employee hairDresser) 
	{
		this.hairDresser = hairDresser;
	}

	public void setCustomer(Person customer) 
	{
		this.customer = customer;
	}

	public void setDate(Date date) 
	{
		this.date = date;
	}

	public void setStartTime(Time startTime) 
	{
		this.startTime = startTime;
	}

	public void setEndTime(Time endTime) 
	{
		this.endTime = endTime;
	}

	public void setStatus(String status) 
	{
		this.status = status;
	}

	public void setDateCreated(Date dateCreated) 
	{
		this.dateCreated = dateCreated;
	}
	
	public void calculateEndTime()
	{
		Time time = startTime;
		time.setMinutes(time.getMinutes() + treatment.getEstimatedTime());
		
		endTime = time;
	}
}